﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;

namespace WorkStation.Common
{
    public class MesConfig
    {
        public string URL { get; set; }
        public CheckIN CheckIN { get; set; } = new CheckIN();
        public CheckOut CheckOut { get; set; } = new CheckOut();
        public Status Status { get; set; } = new Status();
        public FeedingCheck FeedingCheck { get; set; } = new FeedingCheck();
        public CarrierBind CarrierBind { get; set; } = new CarrierBind();
        public Alarm Alarm { get; set; } = new Alarm();
        public CarrierCheck CarrierCheck { get; set; } = new CarrierCheck();
    }


    #region CheckIn
    public class CheckIN
    {
        public string EventID { get; set; }
        public string Line { get; set; }
        public string StationID { get; set; }
        public string MachineID { get; set; }
        public string OPID { get; set; }
        public string Token { get; set; }
        public string FixSN { get; set; }
        public string SN { get; set; }
        public string CarrierID { get; set; }
        public string SendTime { get; set; } //yyyy/MM/dd HH:mm:ss
    }

    public class CheckIN_Result
    {
        public string EventID { get; set; }
        public string RESULT { get; set; } = "FAIL";
        public string MSG { get; set; } = "";
        public string SN { get; set; }
        public string CarrierID { get; set; }
    }
    #endregion
    #region CheckOut
    public class CheckOut
    {
        public string EventID { get; set; }
        public string Line { get; set; }
        public string StationID { get; set; }
        public string MachineID { get; set; }
        public string CarrierID { get; set; } = "";
        public string Mold { get; set; }
        public string OPID { get; set; }
        public string Token { get; set; }
        public string FixSN { get; set; }
        public List<SNInfo> SNInfo { get; set; } = new List<SNInfo>();
        public int Qty { get; set; }
        public string SendTime { set; get; }//yyyy/MM/dd HH:mm:ss
    }
    public class CheckOut_Result
    {
        public string EventID { get; set; }
        public string Result { get; set; }
        public string Machine_GetData { get; set; }
        public string Need_Work { get; set; }
        public List<SN_Info> SN_Info { get; set; } = new List<SN_Info>();
        public string MSG { get; set; }
    }
    #endregion
    public class SNInfo
    {
        public string SN { get; set; }
        public string Result { get; set; }
        //public List<DC_Info> DC_Info { get; set; } = new List<DC_Info>();
        public List<CompList> CompList { get; set; } = new List<CompList>();
        public int Pass_Qty { get; set; }
        public int Fail_Qty { get; set; }

    }
    public class CompList
    {
        public string CompID { get; set; }
        public int Qty { get; set; }
    }
    public class SN_Info
    {
        public string SN { get; set; }
        public string SNResult { get; set; }
        public string MSG_ID { get; set; }
    }
    public class DC_Info
    {
        public string Item { get; set; }
        public string Value { get; set; }
    }
    #region Status
    public class Status
    {
        public string EventID { get; set; }
        public string Line { get; set; }
        public string StationID { get; set; }
        public string MachineID { get; set; }
        public string Token { get; set; }
        public string FixSN { get; set; }
        public string OPID { get; set; }
        public string STATUS { get; set; }
        public string SendTime { get; set; }
    }
    public class Status_Result
    {
        public string EventID { get; set; }
        public string Result { get; set; } = "FAIL";
        public string MSG { get; set; } = "FAIL";

        public string Status { get; set; }
    }
    #endregion

    #region Alarm
    public class Alarm
    {
        public string EventID { get; set; }
        public string Line { get; set; }
        public string StationID { get; set; }
        public string MachineID { get; set; }
        public string OPID { get; set; }
        public string AlarmID { get; set; }
        public string SendTime { get; set; }//yyyy/MM/dd HH:mm:ss
        public string ResetTime { get; set; }
    }
    public class Alarm_Result
    {
        public string EventID { get; set; }
        public string Result { get; set; } = "FAIL";
        public string MSG { get; set; }
        public string AlarmID { get; set; }
    }
    #endregion

    #region FeedingCheck
    public class FeedingCheck
    {
        public string EventID { get; set; }
        public string Line { get; set; }
        public string StationID { get; set; }
        public string MachineID { get; set; }
        public string OPID { get; set; }
        public string Token { get; set; }
        public string FixSN { get; set; }
        public string SN { get; set; }
        public string SendTime { get; set; } //yyyy/MM/dd HH:mm:ss
    }
    public class FeedingCheck_Result
    {
        public string EventID { get; set; }
        public string RESULT { get; set; } = "FAIL";
        public string MSG { get; set; } = "";
        public string SN { get; set; }
    }
    #endregion

    #region CarrierBind
    public class CarrierBind
    {
        public string EventID { get; set; }
        public string Line { get; set; }
        public string StationID { get; set; }
        public string MachineID { get; set; }
        public string OPID { get; set; }
        public string Token { get; set; }
        public string FixSN { get; set; }
        public string SN { get; set; }
        public string BindType { get; set; }
        public string CarrierID { get; set; }
        public string ACPoint { get; set; }
        public string SendTime { get; set; } //yyyy/MM/dd HH:mm:ss
    }
    public class CarrierBind_Result
    {
        public string EventID { get; set; }
        public string RESULT { get; set; } = "FAIL";
        public string MSG { get; set; } = "";
    }
    #endregion

    #region CarrierCheck
    public class CarrierCheck
    {
        public string EventID { get; set; }
        public string Line { get; set; }
        public string StationID { get; set; }
        public string MachineID { get; set; }
        public string OPID { get; set; }
        public string Token { get; set; }
        public string FixSN { get; set; }
        public string CarrierID { get; set; }
        public string SendTime { get; set; } //yyyy/MM/dd HH:mm:ss
    }
    public class CarrierCheck_Result
    {
        public string EventID { get; set; }
        public string RESULT { get; set; } = "FAIL";
        public string MSG { get; set; } = "";
        public string CarrierID { get; set; } = "";
        public List<DC_Info> DC_Infos { get; set; }
    }
    #endregion
}
